package UIComponents.Messages
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;

	
	/**
	 *消息系统UI 
	 * @author 邓坚
	 * 
	 */	
	public class MessageUI extends Sprite
	{
		public var screen:Sprite;
//		public var _btnClose:Sprite;
		public function MessageUI()
		{
			init();
			addListener();
		}
		
		public function init():void
		{
			screen = this.getChildByName("screen") as Sprite;
			//			_btnClose = (this.getChildByName("btnClose") as Sprite);
//			GU_btnToMC.addListener(_btnClose as MovieClip);
		}
		
		public function addListener():void
		{
			this.getChildByName("btnClose").addEventListener(MouseEvent.CLICK,btn_clickHandler);
		}
		
		public function btn_clickHandler(e:Event):void
		{
			//this.dispatchEvent(new PanelEvent(PanelEvent.CLOSE,true));
			this.dispatchEvent(new PanelEvent("messageClose",4,true));
			e.stopPropagation();
			
			
		
		}

		
	}
}